<%@page import="org.votes.bean.Details"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'votes.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	<%
		List<Details> list = (List<Details>)request.getAttribute("list");
	 %>
  </head>
  
  <body>
    Votes. <br>
    <img alt="无聊" src="<%=basePath %>WEB-INF/images/logo.jpg">
    <table>
    	<c:forEach var="details" items="${list }">
    	<tr>
    		<td colspan="2">
				<label>
					${details.id }, ${details.title }
				</label>
    		<td>
    	<tr>
    	<tr>
    		<td>
				<input type="radio" name="answer1">
				${details.answer1}
    		<td>
    		
    		<td>
				<input type="radio" name="answer1">
				${details.answer2 }
    		<td>
    	<tr>
    	<tr>
    		<td>
				<input type="radio" name="answer1">
				${details.answer3 }
    		<td>
    		
    		<td>
				<input type="radio" name="answer1">
				${details.answer4 }
    		<td>
    	<tr>
    	<tr>
    		<td colspan="2">
				<input type="submit">
    		<td>
    	<tr>
    	</c:forEach>
    </table>
    
  </body>
</html>
